<?php
$this->headTitle('Đăng nhập');
$formLogin->setAttribute('action', $this->url('user-login'));
$formLogin->setAttribute('class', 'form-horizontal');
$formLogin->prepare();
echo $this->form()->openTag($formLogin);
?>

<div class="form-group">
    <?php echo $this->formLabel($formLogin->get('member_email')); ?>
    <div class="col-md-4">
        <?php echo $this->formInput($formLogin->get('member_email')); ?>
        <?php if ($this->formElementErrors($formLogin->get('member_email'))) { ?>
            <div class="alert-danger" style="margin-top: 10px;">
                <?php echo $this->formElementErrors($formLogin->get('member_email')); ?>
            </div>
        <?php } ?>
    </div>
</div>
<div class="form-group">
    <?php echo $this->formLabel($formLogin->get('member_password')); ?>
    <div class="col-md-4">
        <?php echo $this->formPassword($formLogin->get('member_password')); ?>
        <?php if ($this->formElementErrors($formLogin->get('member_password'))) { ?>
            <div class="alert-danger" style="margin-top: 10px;">
                <?php echo $this->formElementErrors($formLogin->get('member_password')); ?>
            </div>
        <?php } ?>
        <?php if (isset($message)) { ?>
            <div class="alert-danger" style="margin-top: 10px;">
                <?php echo $message; ?>
            </div>
        <?php } ?>
    </div>
</div>
<div class="form-group">
    <?php echo $this->formLabel($formLogin->get('remember_me')); ?>
    <div class="col-md-4">
        <?php echo $this->formCheckbox($formLogin->get('remember_me')); ?>
        <?php if ($this->formElementErrors($formLogin->get('remember_me'))) { ?>
            <div class="alert-danger" style="margin-top: 10px;">
                <?php echo $this->formElementErrors($formLogin->get('remember_me')); ?>
            </div>
        <?php } ?>
    </div>
</div>
<div class="form-group">
    <div class="col-sm-offset-2 col-sm-10">
        <?php echo $this->formSubmit($formLogin->get('login')); ?>
    </div>
</div>
<?php echo $this->form()->closeTag(); ?>